package com.skyline.manage.feed;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Properties;

import org.apache.log4j.Logger;

public class ConfigLoader {

	private static Properties props = null;

	private static Logger logger = null;

	public static void initial(String filePath) {
		logger = Logger.getLogger(ConfigLoader.class);
		props = new Properties();
		try {
			InputStream in = new BufferedInputStream(new FileInputStream(filePath));
			props.load(in);
			logger.info("配置文件载入完成");
		} catch (Exception e) {
			logger.info("配置文件载入失败", e);
		}
	}

	public static String getValue(String key) {
		return props.getProperty(key);
	}
}
